package com.zw.weiyi.avtivity;

import android.content.ContentResolver;
import android.content.ContentValues;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;

import com.zw.weiyi.enety.Call;
import com.zw.weiyi.enety.Person;
import com.zw.weiyi.phonesms.BaseActivity;
import com.zw.weiyi.phonesms.R;
import com.zw.weiyi.util.CallUtil;
import com.zw.weiyi.util.MyApplication;

/**
 * 添加联系人
 * @author Striver_zw
 *  Date 2014-12-05
 */
public class CallInfo extends BaseActivity {
	private TextView call_name,call_num,call_bo,call_lai,call_wei;
	private Button call_finsh;
	private Call call;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.call_info);
	
		initview();
	}

	// init
	public void initview() {
		call_finsh = (Button) findViewById(R.id.call_finsh);
		call_name = (TextView) findViewById(R.id.call_name);
		call_num = (TextView) findViewById(R.id.call_num);
		call_bo = (TextView) findViewById(R.id.call_bo);
		call_lai = (TextView) findViewById(R.id.call_lai);
		call_wei = (TextView) findViewById(R.id.call_wei);
		call = new Call();
		Intent intent = this.getIntent();
		call.setName(intent.getStringExtra("name"));
		call.setNumber(intent.getStringExtra("number"));
		//赋值
		call_name.setText(call.getName());		
		call_num.setText(call.getNumber());
		call_bo.setText(CallUtil.seleteCallget2(getApplicationContext(), call.getNumber())+"");
		call_lai.setText(CallUtil.seleteCallget1(getApplicationContext(), call.getNumber())+"");
		call_wei.setText(CallUtil.seleteCallget3(getApplicationContext(), call.getNumber())+"");
		
		call_finsh.setOnClickListener(new OnClickListener() {			
			@Override
			public void onClick(View v) {
				finish();				
			}
		});
	}
}
